package com.zjxf.service;

import com.zjxf.base.bean.po.UmsUser;
import com.zjxf.base.bean.vo.VoUmsUser;
import com.zjxf.base.common.OperationException;

import java.util.Optional;

/**
 * created with IntelliJ IDEA
 *
 * @author: create by limu
 * Date: 2019/11/15
 * Time：16:15
 */
public interface UmsUserService {

    /**
     * 用户id
     *
     * @param id 主键id
     * @return Optional<User>
     */
    Optional<UmsUser> findById(Long id);

    /**
     * 删除用户
     *
     * @param userId 用户主键id
     */
    void deleteUser(Long userId) throws OperationException;

    /**
     * 根据用户名称查询用户
     */
    Optional<UmsUser> findByUsernameAndDeleteState(String userName, Integer deleteState);

    /**
     * 添加或修改
     *
     * @param voUser
     */
    void addOrUpdate(VoUmsUser.addOrUpdate voUser) throws OperationException;
}
